// 资源管理
import request from '@/utils/request'
import APIurl from '@/api/apiUrl/index.js'
// 资源文件上传
export function sourceUpload(params) {
  return request({
    url: APIurl.reportSourceController.upload,
    method: 'post',
    data: params
  })
}
// 新增资源表数据
export function sourceAdd(params) {
  return request({
    url: APIurl.reportSourceController.add,
    method: 'post',
    data: params
  })
}
// 删除资源表数据
export function sourceDelete(params) {
  return request({
    url: APIurl.reportSourceController.delete + '?sourceId=' + params,
    method: 'post'
    // data: params
  })
}
// 查询所有资源表数据
export function sourceGetAll(params) {
  return request({
    url: APIurl.reportSourceController.getAll,
    method: 'post',
    data: params
  })
}
// 查询分页资源表数据
export function sourceGetAllPage(params) {
  return request({
    url: APIurl.reportSourceController.getAllPage,
    method: 'post',
    data: params
  })
}
// 更新资源表数据
export function sourceUpdate(params) {
  return request({
    url: APIurl.reportSourceController.update,
    method: 'post',
    data: params
  })
}
export default{
  sourceUpdate, sourceGetAllPage, sourceGetAll, sourceDelete, sourceAdd, sourceUpload
}
